import 'package:dailoz/size_config.dart';
import 'package:flutter/material.dart';

class ThirdPartyLoginButton extends StatelessWidget {
  const ThirdPartyLoginButton({
    Key? key,
    required this.onPressed,
    required this.icon,
    this.iconColor = Colors.white,
  }) : super(key: key);

  final VoidCallback onPressed;
  final IconData icon;
  final Color? iconColor;

  @override
  Widget build(BuildContext context) {
    return RawMaterialButton(
      onPressed: onPressed,
      shape: const CircleBorder(),
      fillColor: Colors.white,
      constraints: BoxConstraints.tightFor(
        width: SizeConfig.getProportionateScreenWidth(42.0),
        height: SizeConfig.getProportionateScreenHeight(42.0),
      ),
      child: Icon(
        icon,
        color: iconColor,
        size: SizeConfig.getProportionateFontSize(24.0),
      ),
    );
  }
}
